import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import store from './store'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor)

import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
Vue.prototype.axios = axios

axios.defaults.baseURL = 'http://localhost:80' /*配置前缀URL*/
Vue.prototype.$axios = axios
Vue.use(ElementUI)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

Vue.prototype.insertLog = function (mokuai) {
  this.$axios.post('http://localhost:80/memberCommon/details-logs/insertLog/' + JSON.parse(localStorage.getItem('user')).id + '/' + JSON.parse(localStorage.getItem('user')).name + '/' + mokuai)
}

Vue.prototype.updateLog = function (mokuai) {
  this.$axios.post('http://localhost:80/memberCommon/details-logs/updateLog/' + JSON.parse(localStorage.getItem('user')).id + '/' + JSON.parse(localStorage.getItem('user')).name + '/' + mokuai)
}

Vue.prototype.deleteLog = function (mokuai) {
  this.$axios.post('http://localhost:80/memberCommon/details-logs/deleteLog/' + JSON.parse(localStorage.getItem('user')).id + '/' + JSON.parse(localStorage.getItem('user')).name + '/' + mokuai)
}